package cv.vender;



import android.content.Context;
import android.media.AudioManager;
import android.media.SoundPool;

import com.cvricevender.R;


public class clsSound {

	public static  int payok=0;
	public static int device_err;
	public static int fail_to_getqrcode;
	public static int fail_to_transfor;
	public static int fetch_code_tips;
	public static int getqrcode;
	public static int net_err;
	public static int net_error_verify_code;
	public static int plsscanf;
	public static int transforing;
	public static int transforok;
	public static int plsputcash;
	public static int plsswipe;
	public static int welcometips;
    private static SoundPool soundPool = null;
    private static int currentid=0;
	
	public static void LoadSound(Context c)
	{
		if(soundPool==null)
		{
			soundPool= new SoundPool(10,AudioManager.STREAM_SYSTEM,5);
			//buy_paycash=soundPool.load(c, R.r,1);
			device_err=soundPool.load(c,R.raw.device_err,1);
            fail_to_getqrcode = soundPool.load(c, R.raw.fail_to_getqrcode, 1);
            fail_to_transfor=soundPool.load(c,R.raw.fail_to_transfor,1);
			//fetch_code_tips=soundPool.load(c,R.raw.fetch_code_tips,1);
			getqrcode=soundPool.load(c,R.raw.getqrcode,1);
			net_err=soundPool.load(c,R.raw.net_err,1);
			payok=soundPool.load(c,R.raw.payok,1);
			plsscanf=soundPool.load(c,R.raw.plsscanf,1);
			transforing=soundPool.load(c,R.raw.transforing,1);
			transforok=soundPool.load(c,R.raw.transforok,1);

			plsswipe=soundPool.load(c,R.raw.plsswipe,1);
			plsputcash=soundPool.load(c,R.raw.plsputcash,1);
			welcometips=soundPool.load(c,R.raw.welcometips,1);//欢迎使用 福口冠 现 磨全自动鲜米机,请选择您想购买的金额

		}
	}
	
	public static void makeSound(int id)
	{
		soundPool.stop(currentid);
		currentid= soundPool.play(id,1, 1, 0, 0, 1);
	}
	
}
